package com.heima.admin.controller.v1;

import com.heima.admin.service.LoginService;
import com.heima.model.admin.admin.AdminDta;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author tujian
 * @Date 2022年03月24日 11:39:08
 */
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private LoginService loginService;

    /**
     * 登录
     */
    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdminDta dto){
        return loginService.login(dto);
    }
}
